package com.outlook.flowervow;

import net.minecraft.server.v1_8_R3.Item;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;

public class Gui {
    public static void Menu(Player p){

        Inventory gui = Bukkit.createInventory(null,54, ChatColor.GREEN + "TeaBane Menu");
        ItemStack greenglass = new ItemStack(Material.STAINED_GLASS_PANE,1,(byte)5);
        ItemStack darkgreenglass = new ItemStack(Material.STAINED_GLASS_PANE,1,(byte)13);
        ItemStack redglass = new ItemStack(Material.STAINED_GLASS_PANE,1,(byte)14);
        ItemStack hub = new ItemStack(Material.BEACON,1);
        ItemStack rank = new ItemStack(Material.NAME_TAG,1);
        //----------------------------------------------------------
        ItemStack survival = new ItemStack(Material.GRASS,1);
        ItemStack bridge = new ItemStack(Material.SANDSTONE,1);
        ItemStack ffa = new ItemStack(Material.DIAMOND_SWORD,1);
        ItemStack pvp = new ItemStack(Material.GOLD_SWORD,1);
        ItemStack bedwars = new ItemStack(Material.BED,1);
        ItemStack rush = new ItemStack(Material.STICK,1);
        //----------------------------------------------------------
        ItemMeta hubm = hub.getItemMeta();
        ItemMeta bedm = bedwars.getItemMeta();
        ItemMeta ffam = ffa.getItemMeta();
        ItemMeta pvpm = pvp.getItemMeta();
        ItemMeta brim = bridge.getItemMeta();
        ItemMeta surm = survival.getItemMeta();
        ItemMeta ggm = greenglass.getItemMeta();
        ItemMeta dgm = darkgreenglass.getItemMeta();
        ItemMeta rgm = redglass.getItemMeta();
        ItemMeta rushm = rush.getItemMeta();
        ItemMeta rankm = rank.getItemMeta();
        bedm.setDisplayName(ChatColor.GOLD+"》经典BedWars起床战争");
        ffam.setDisplayName(ChatColor.RED+"》多人乱斗PVPFFA模式"+ChatColor.GREEN+"TeaBane团队原创插件");
        pvpm.setDisplayName(ChatColor.DARK_RED+"》Duel单挑PVP竞技场");
        brim.setDisplayName(ChatColor.AQUA+"》Bridge搭路练习(大佬专场)"+ChatColor.GREEN+" HOT!");
        surm.setDisplayName(ChatColor.GREEN+"》趣味生存合集");
        rushm.setDisplayName(ChatColor.LIGHT_PURPLE+"》Rush击退起床"+ChatColor.GREEN+"TeaBane团队原创插件");
        dgm.setDisplayName(ChatColor.DARK_GREEN+"|");
        ggm.setDisplayName(ChatColor.DARK_GREEN+"|");
        rgm.setDisplayName(ChatColor.DARK_GREEN+"|");
        hubm.setDisplayName(ChatColor.GREEN+"》点击回到主大厅");
        rankm.setDisplayName(ChatColor.GOLD+"》更换称号前/后缀");
        bedwars.setItemMeta(bedm);
        survival.setItemMeta(surm);
        bridge.setItemMeta(brim);
        rank.setItemMeta(rankm);
        rush.setItemMeta(rushm);
        pvp.setItemMeta(pvpm);
        ffa.setItemMeta(ffam);
        hub.setItemMeta(hubm);
        greenglass.setItemMeta(ggm);
        darkgreenglass.setItemMeta(dgm);
        redglass.setItemMeta(rgm);

        gui.setItem(1,greenglass);
        gui.setItem(2,greenglass);
        gui.setItem(3,greenglass);
        gui.setItem(4,greenglass);
        gui.setItem(5,greenglass);
        gui.setItem(10,greenglass);
        gui.setItem(19,greenglass);
        gui.setItem(28,greenglass);
        gui.setItem(37,greenglass);
        gui.setItem(46,greenglass);
        gui.setItem(47,greenglass);
        gui.setItem(48,greenglass);
        gui.setItem(49,greenglass);
        //绿色玻璃
        gui.setItem(5,redglass);
        gui.setItem(6,redglass);
        gui.setItem(7,redglass);
        gui.setItem(8,redglass);
        gui.setItem(17,redglass);
        gui.setItem(26,redglass);
        gui.setItem(35,redglass);
        gui.setItem(44,redglass);
        gui.setItem(50,redglass);
        gui.setItem(51,redglass);
        gui.setItem(52,redglass);
        gui.setItem(53,redglass);
       //红色玻璃
        gui.setItem(11,darkgreenglass);
        gui.setItem(16,darkgreenglass);
        gui.setItem(20,darkgreenglass);
        gui.setItem(25,darkgreenglass);
        gui.setItem(29,darkgreenglass);
        gui.setItem(34,darkgreenglass);
        gui.setItem(38,darkgreenglass);
        gui.setItem(43,darkgreenglass);
       //深绿玻璃
       //-------------------------------------------
        gui.setItem(12,bridge);
        gui.setItem(13,survival);
        gui.setItem(14,bedwars);
        gui.setItem(15,rush);
        gui.setItem(21,ffa);
        gui.setItem(22,pvp);
        gui.setItem(0,hub);
        gui.setItem(9,rank);
        p.openInventory(gui);





    }
}
